package com.xw.base.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Description:
 * @Author: y
 * @CreateDate: 4/13/21 2:26 PM
 * @Version: 1.0
 */
@Configuration
public class WebUrlConfig implements WebMvcConfigurer {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/").setViewName("XAdmin/index");
        registry.addViewController("/index").setViewName("XAdmin/index");
        registry.addViewController("/login").setViewName("XAdmin/login");
        registry.addViewController("/welcome").setViewName("XAdmin/welcome");


        //预约列表
        registry.addViewController("/reservation_list").setViewName("XAdmin/reservation/reservation_list");
        //预约设置
        registry.addViewController("/reservation_setting_list").setViewName("XAdmin/reservation/reservation_setting_list");
        registry.addViewController("/reservation_setting_list_add").setViewName("XAdmin/reservation/reservation_setting_list_add");
        registry.addViewController("/reservation_setting_list_edit").setViewName("XAdmin/reservation/reservation_setting_list_edit");

        //system setting
        registry.addViewController("/user_pwd").setViewName("XAdmin/user_pwd");

        registry.setOrder(Ordered.HIGHEST_PRECEDENCE);

    }
}